<template>
  <tr>
    <td>{{ list.id }}</td>
    <td>{{ list.name }}</td>
    <td>{{ list.date }}</td>
    <td>
      <button @click="btnDel" :disabled="istru">删除</button>
      <button @click="btnEdit">编辑</button>
    </td>
  </tr>
</template>

<script>
export default {
  data () {
    return {
      disabled: ''
    }
  },
  props: {
    list: {
      type: Object,
      require: true
    },
    istru: {
      type: Boolean,
      require: true
    }
  },
  created () {},

  methods: {
    btnDel () {
      this.$emit('btn-del', this.list.id)
    },
    btnEdit () {
      this.$emit('btn-edit', this.list.id)
    }
  }
}
</script>

<style scoped lang="less"></style>
